import React from 'react';
import '../Login/Login.css'
import {Form, Input, type FormProps } from 'antd';
type FieldType = {
    accounst?: string;
    password?: string;
    remember?: string;
};

function Login() {
    const onFinish: FormProps<FieldType>['onFinish'] = (values: any) => {
    console.log('Success:', values);
};

const onFinishFailed: FormProps<FieldType>['onFinishFailed'] = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
};
    return (
        <div className='login-bj'>
            <div className="from">
                <Form
                 initialValues={{ remember: true }}
                 onFinish={onFinish} 
                 autoComplete="off"
                 onFinishFailed={onFinishFailed}
                 style={{ maxWidth: 600 }}
                >
                    <Form.Item 
                      label="accounts" name="accounts"
                      rules={[{ required: true, message: 'Please input your username!' }]}
                    >
                        <Input />
                    </Form.Item>

                     <Form.Item 
                      label="password" name="password"
                      rules={[{ required: true, message: 'Please input your username!' }]}
                    >
                        <Input />
                    </Form.Item>
                </Form>
            </div>
        </div>
    );
}

export default Login;
